package com.southpark.demo.control.commands.data
{
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.southpark.demo.control.events.data.GetDataEvent;
	import com.southpark.demo.control.proxies.data.GetDataProxy;
	import com.southpark.demo.control.responders.BaseResponder;
	

	public class GetDataCommand extends BaseResponder
	{
		override public function execute(cairngormEvent:CairngormEvent):void
		{
			super.execute(cairngormEvent);	
			var event:GetDataEvent = cairngormEvent as GetDataEvent;
			var proxy:GetDataProxy = new GetDataProxy(this);
			
			switch (event.type)
			{
				case GetDataEvent.GET_DATA_1_EVENT:
				{
					proxy.execute1(event.param1,event.param2);
					break;
				}
				
				case GetDataEvent.GET_DATA_2_EVENT:
				{
					proxy.execute2(event.param1,event.param2);
					break;
				}
			}
			
			
		}
		
	}
}